package actors

import akka.actor.typed.Behavior
import akka.actor.typed.scaladsl.Behaviors
import akka.stream.Materializer
import play.api.i18n.Messages
import play.api.libs.ws.WSClient
import tool.Pojo._

/**
 * Created by yz on 28/10/2020
 */
object ActorManager {

  def apply()(implicit dao: MyDao, ws: WSClient, materializer: Materializer,messages: Messages): Behavior[Nothing] = Behaviors.
    setup[Nothing] { context =>
      val missionManager = context.spawn(MissionManager(), s"missionManager")
      missionManager ! Ask
      val workflowMissionManager = context.spawn(WorkflowMissionManager(), s"workflowMissionManager")
      workflowMissionManager ! Ask
      Behaviors.unhandled
    }

}
